﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Drawing;

namespace GenerateMovieList
{
    class images
    {
        public images() { }

        public void downloadimages(string url, string path, string type)
        {
            try
            {
                string localfile = path + @"\" + type + ".jpg";
                WebRequest requestPic = WebRequest.Create(url);
                WebResponse responsePic = requestPic.GetResponse();
                Image webImage = Image.FromStream(responsePic.GetResponseStream());
                webImage.Save(localfile);
            }
            catch { }
        }
    }
}
